"""web URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
# from django.contrib import admin
from . import views

urlpatterns = [
    # url(r'^admin/', include('myadmin.urls')),


    #前台首页
    url(r'^$', views.index,name='myhome_index'),
    # 列表页
    url(r'^list/(?P<tid>[0-9]+)/$', views.list,name='myhome_list'),
    # 详情页
    url(r'^info/(?P<gid>[0-9]+)/$', views.info,name='myhome_goods'),
    # 注册页面
    url(r'^register/$', views.register,name='myhome_register'),
    # 登录页面
    url(r'^login/$', views.login,name='myhome_login'),
    # 短信发送测试
    url(r'^sendsms/$', views.sendsms,name='myhome_sendsms'),
    


    # 购物车,添加
    url(r'^cart/add/$', views.cartadd,name='myhome_cartadd'),

    # 购物车列表,
    url(r'^cart/index/$', views.cartindex,name='myhome_cartindex'),

    # 更新购物车数量
    url(r'^cart/edit/$', views.cartedit,name='myhome_cartedit'),

    #删除购物车商品
    url(r'^cart/delete/$', views.cartdelete,name='myhome_cartdelete'),
    # 清空
    url(r'^cart/dels/$', views.cartdels,name='myhome_cartdels'),

    #确认订单
    url(r'^confirm/order/$',views.confirmorder,name='myhome_confirmorder'),
    #添加收货地址
    url(r'^address/insert/$',views.addressinsert,name='myhome_addressinsert'),
    #设置默认指定
    url(r'^address/set/$',views.addressset,name='myhome_addressset'),

    #提交订单
    url(r'^order/insert/$',views.orderinsert,name='myhome_orderinsert'),
    #付款页面
    url(r'^buyjia/(?P<oid>[0-9]+)/$',views.buyjia,name='myhome_buyjia'),
    #我的订单
    url(r'^myorders/$',views.myorders,name='myhome_myorders'),

]


